package com.example.mybatis.moudle;

import java.io.Serializable;
import lombok.Data;

/**
 * paykind
 * @author 
 */
@Data
public class Paykind implements Serializable {
    private Integer kindId;

    /**
     * 如：服饰，鞋帽。人情往来，过节红包等
     */
    private String kindName;

    /**
     * 2支出，1收入
     */
    private Object kindFlag;

    private static final long serialVersionUID = 1L;

    public Paykind() {
    }

    public Paykind(Integer kindId, String kindName, Object kindFlag) {
        this.kindId = kindId;
        this.kindName = kindName;
        this.kindFlag = kindFlag;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Paykind other = (Paykind) that;
        return (this.getKindId() == null ? other.getKindId() == null : this.getKindId().equals(other.getKindId()))
            && (this.getKindName() == null ? other.getKindName() == null : this.getKindName().equals(other.getKindName()))
            && (this.getKindFlag() == null ? other.getKindFlag() == null : this.getKindFlag().equals(other.getKindFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getKindId() == null) ? 0 : getKindId().hashCode());
        result = prime * result + ((getKindName() == null) ? 0 : getKindName().hashCode());
        result = prime * result + ((getKindFlag() == null) ? 0 : getKindFlag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "Paykind{" +
                "kindId=" + kindId +
                ", kindName='" + kindName + '\'' +
                ", kindFlag=" + kindFlag +
                '}';
    }
}